'use strict';
const BaseController = require('../base');
class RouterController extends BaseController {
  static get serviceName() {
    return 'business.dish';
  }

  // 批量创建菜品官方参考价格
  async batchCreate() {
    const { ctx } = this;
    const payload = ctx.request.body;
    console.log(payload.dishes.map(item => item.base_price))
    const result = await this.service.batchCreate(payload);
    ctx.success(result);
  }
  async groupList() {
    const { ctx } = this;
    const result = await this.service.groupList(this.ctx.query);
    ctx.success(result);
  }

}
module.exports = RouterController;
